package com.example.fresh_fruit.service.Impl;

import com.example.fresh_fruit.entity.Supplier;
import com.example.fresh_fruit.mapper.SupplierMapper;
import com.example.fresh_fruit.service.SupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author :飞天の鱼
 * @date : 2022/8/16 16:59
 */
@Service
public class SupplierServiceImpl implements SupplierService {

    @Autowired
    private SupplierMapper supplierMapper;

    @Override
    public boolean insertSupplier(Supplier supplier) {
        return supplierMapper.insert(supplier);
    }

    @Override
    public boolean upSupplier(Supplier supplier) {
        return false;
    }

    @Override
    public List<Supplier> selectAll() {
        return supplierMapper.selectAll();
    }

    @Override
    public List<Supplier> findName(String name) {
        return supplierMapper.findByName(name);
    }
}
